package com.sright.bcard.user.dal.dao.impl;

import com.sright.bcard.common.service.share.base.dao.BaseDAOImpl;
import com.sright.bcard.common.service.share.base.dao.BaseMapper;
import com.sright.bcard.user.dal.dao.VisitorDateDAO;
import com.sright.bcard.user.dal.entity.VisitorDateDO;
import com.sright.bcard.user.dal.mapper.VisitorDateDOMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

@Repository
public class VisitorDateDAOImpl extends BaseDAOImpl<VisitorDateDO> implements VisitorDateDAO {

    @Resource
    private VisitorDateDOMapper visitorDateDOMapper;

    @Override
    protected BaseMapper<VisitorDateDO> getObjMapper() {
        return visitorDateDOMapper;
    }

    @Override
    public VisitorDateDO selectByObject(VisitorDateDO visitorDateDO) {
        return visitorDateDOMapper.selectByObject(visitorDateDO);
    }

    @Override
    public Integer selectSumByType(Long userId, int type) {
        return  visitorDateDOMapper.selectSumByType(userId,type);
    }
}
